package cn.com.cym.gamezao.enums;

import io.swagger.annotations.ApiModel;

/**
 * 验证类型
 * 1.用户登录
 * 2.用户注册
 * 3.用户修改密码 等
 */
@ApiModel("验证类型枚举")
public enum ValidType {
    LOGIN("LOGIN","登录"),
    REGISTER("REGISTER","注册"),
    MODIFY("MODIFY","修改密码");

    private String sign;

    private String value;

    private ValidType(String sign,String value){
        this.sign=sign;
        this.value=value;
    }

    public String getSign(){
        return this.sign;
    }

    public String getValue(){
        return this.value;
    }

    public  static  ValidType fromSign(String sign){
        for(ValidType validType:ValidType.values()){
            if(validType.getSign().equals(sign)){
                return validType;
            }
        }
        return  null;
    }
}
